package partes_GUI;

import java.awt.event.KeyEvent;
import java.awt.event.KeyListener;

public class NumListener implements KeyListener{

	public void keyPressed(KeyEvent arg0) {
		if (((arg0.getKeyChar()>'9')||
				(arg0.getKeyChar()<'0'))&&
				(arg0.getKeyChar()!='\b'))
				arg0.consume();
	}

	public void keyReleased(KeyEvent arg0) {
		if (((arg0.getKeyChar()>'9')||
				(arg0.getKeyChar()<'0'))&&
				(arg0.getKeyChar()!='\b'))
				arg0.consume();
	}

	public void keyTyped(KeyEvent arg0) {
		if (((arg0.getKeyChar()>'9')||
				(arg0.getKeyChar()<'0'))&&
				(arg0.getKeyChar()!='\b'))
				arg0.consume();
	}
}